package Dao;
import Model.Department;
import Model.DepartmentChanged;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

public interface DepartmentDao {

    /**
     * 接口
     *
     * @return
     */
    List<Department> getAllDepartmentList();

    /**
     * 接口
     *
     * @return
     */
    List<DepartmentChanged> getAllDepartmentChangedList();

    /**
     * 搜索-信息页面
     *
     * @param departmentName
     * @param regionCode
     * @param status
     */
    List<Department> findDepartmentInfo(@Param(value = "departmentName") String departmentName, @Param(value = "regionCode") String regionCode, @Param(value = "status") String status);

    /**
     * 查询/根据id
     *
     * @param id
     */
    Department findDepartmentInfobyID(@Param("id") Integer id);


    /**
     * 查询/根据id
     *
     * @param id
     */
    Department searchdelete(@Param("id") Integer id);

    int insertDel(Department department);


    /**
     * 搜索-变更页面
     *
     * @param nameSearch
     * @param settleCodeSearch
     * @param titleSearch
     * @return
     */
    List<DepartmentChanged> findChangedInfo(@Param("nameSearch") String nameSearch, @Param("settleCodeSearch") String settleCodeSearch, @Param("titleSearch") String titleSearch);

    int updateById(Department department);

    int createDeparmentInfo(Department department);

    int deleteByPrimaryKey(Integer id);

    void InputExcel(Map<String, Map<String, Object>> param);

    //
    List<Department> getAll();

    void InsertHistoryChange(Map<String, Object> insertInfo);

    List<Department> findOrgInfobySettleCode(String settleCode);
}
